package com.ruoyi.algorithm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.algorithm.annotation.TableStructAnno;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName manufacturer
 */
@TableName(value = "manufacturer")
@Data
@ApiModel
@TableStructAnno("manufacturer")
public class Manufacturer implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id")
    @ApiModelProperty("id")
    @TableStructAnno("id")
    private Long id;

    /**
     * 厂商名称
     */
    @ApiModelProperty("厂商名称")
    @TableStructAnno("厂商名称")
    @TableField(value = "name")
    private String name;

    /**
     * 厂商英文名
     */
    @ApiModelProperty("厂商英文名")
    @TableStructAnno("厂商英文名")
    @TableField(value = "short_name")
    private String shortName;


    /**
     * 联系电话
     */
    @ApiModelProperty("联系电话")
    @TableStructAnno("联系电话")
    @TableField(value = "telephone")
    private String telephone;

    /**
     * 联系地址
     */
    @ApiModelProperty("联系地址")
    @TableStructAnno("联系地址")
    @TableField(value = "address")
    private String address;

    /**
     * 联系人姓名
     */
    @ApiModelProperty("联系人姓名")
    @TableStructAnno("联系人姓名")
    @TableField(value = "contacts")
    private String contacts;

    /**
     * qq号码
     */
    @ApiModelProperty("qq号码")
    @TableStructAnno("qq号码")
    @TableField(value = "tencent_qq")
    private String tencentQq;

    /**
     * 微信号码
     */
    @ApiModelProperty("微信号码")
    @TableStructAnno("微信号码")
    @TableField(value = "wechat_account")
    private String wechatAccount;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @TableStructAnno("创建时间")
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @TableStructAnno("更新时间")
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 创建人
     */
    @ApiModelProperty("创建人")
    @TableStructAnno("创建人")
    @TableField(value = "create_user")
    private Long createUser;

    /**
     * 更新人
     */
    @ApiModelProperty("更新人")
    @TableStructAnno("更新人")
    @TableField(value = "update_user")
    private Long updateUser;

    /**
     * 删除标志（0未删除；1已删除）
     */
    @ApiModelProperty("删除标志（0未删除；1已删除）")
    @TableStructAnno("删除标志")
    @TableField(value = "del_flag")
    private String delFlag;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Manufacturer other = (Manufacturer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                && (this.getShortName() == null ? other.getShortName() == null : this.getShortName().equals(other.getShortName()))
                && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone()))
                && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
                && (this.getContacts() == null ? other.getContacts() == null : this.getContacts().equals(other.getContacts()))
                && (this.getTencentQq() == null ? other.getTencentQq() == null : this.getTencentQq().equals(other.getTencentQq()))
                && (this.getWechatAccount() == null ? other.getWechatAccount() == null : this.getWechatAccount().equals(other.getWechatAccount()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
                && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
                && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getShortName() == null) ? 0 : getShortName().hashCode());
        result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getContacts() == null) ? 0 : getContacts().hashCode());
        result = prime * result + ((getTencentQq() == null) ? 0 : getTencentQq().hashCode());
        result = prime * result + ((getWechatAccount() == null) ? 0 : getWechatAccount().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", shortName=").append(shortName);
        sb.append(", telephone=").append(telephone);
        sb.append(", address=").append(address);
        sb.append(", contacts=").append(contacts);
        sb.append(", tencentQq=").append(tencentQq);
        sb.append(", wechatAccount=").append(wechatAccount);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createUser=").append(createUser);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
